package aom.ju.ss.view.user.shop.management.goods

import aom.ju.ss.R
import aom.ju.ss.databinding.ChangeInventoryBinding
import aom.ju.ss.lpInterface.BindViewInterface
import aom.ju.ss.utils.VG
import aom.ju.ss.utils.data
import aom.ju.ss.utils.http.LP_API
import aom.ju.ss.utils.show
import aom.ju.ss.view.base.BaseListActivity

class ChangeInventory : BaseListActivity() {
    override fun interFace(): BindViewInterface {
        return BindViewInterface { b, position ->
            val ib = b as ChangeInventoryBinding

        }

    }

    override fun key(): Array<String> {
        return arrayOf("id")
    }

    override fun value(): Array<String> {
        return arrayOf(activity!!.data)
    }

    override fun api(): String {
        return LP_API.get_attr_list
    }

    override fun item(): Int {
        return R.layout.change_inventory
    }

    override fun ListonCreate() {
        binding.title.backImg.setImageResource(R.drawable.ic_back_black)
        binding.title.title.text = "修改库存"
//        binding.list.rootView.setBackgroundResource(R.color.color_f5f5f5)
        binding.rootView.setBackgroundResource(R.color.color_f5f5f5)
        binding.title.line.VG(true)
        binding.bt.VG(true)
    }


    override fun ok(jsonString: String, httpTY: String) {
        super.ok(jsonString, httpTY)
        setLists(arrayListOf("", "", ""))
    }

    override fun error(e: String, jsonString: String, httpTY: String) {
        super.error(e, jsonString, httpTY)
        e.show
    }

}